#include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
const int maxn = 5 + 10;

int a[maxn];
int n;

void show() {
    for (int i = 0; i < n; ++i)
        printf("%d ", a[i]);
    puts("");
}

int lowerB(int *a, int l, int r, int x) {
    while (l < r) {
        int mid = (l + r) / 2;
        if (a[mid] >= x)
            r = mid;
        else
            l = mid + 1;
    }
    return r;
}

int upperB(int *a, int l, int r, int x) {
    while (l < r) {
        int mid = (l + r) / 2;
        if (a[mid] > x)
            r = mid;
        else
            l = mid + 1;
    }
    return r;
}

int binSearch(int *a, int l, int r, int x) {
    while (l < r) {
        int mid = (l + r + 1) / 2;  // l = mid ʱ�� mid ����ȡ��
        if (a[mid] <= x)
            l = mid;
        else
            r = mid - 1;
    }
    return l;
}

double mySqrt(double x) {
    double l = 0, r = x < 1 ? 1 : x;
    const double eps = 1e-10;
    while (l + eps < r)
    // for (int i = 0; i < 1000; ++i)
    {
        double mid = (l + r) / 2;
        if (mid * mid > x)
            r = mid;
        else
            l = mid;
    }
    return r;
}

int main() {
    for (int i = 1; i <= 100; ++i)
        printf("%.20f\n%.20f\n", mySqrt(i), sqrt(i));
}
